﻿<UserControl x:Class="EX_NFC.FrontEnd.Windows.Controls.TagBlock"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <!-- ROW 0 -->
        <TextBox Grid.Column="0"
                 Grid.Row="0"
                 Margin="{DynamicResource BasicMargin}"
                 Grid.ColumnSpan="2"
                 Text="{Binding BlockDataString,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>

        <!-- ROW 1 -->
        <StackPanel Grid.Column="0"
                    Grid.Row="1"
                    Orientation="Horizontal"
                    Grid.ColumnSpan="2"
                    HorizontalAlignment="Center">
            <RadioButton IsChecked="{Binding ByteBlock}"
                         Content="{Binding Source={StaticResource Localizer},Path=Localize.TagBlock_Byte}"
                         Margin="{DynamicResource BasicMargin}" />
            <RadioButton IsChecked="{Binding ByteBlock,Converter={StaticResource OppositeBoolConverter}}"
                         Content="{Binding Source={StaticResource Localizer},Path=Localize.TagBlock_String}"
                         Margin="{DynamicResource BasicMargin}" />
        </StackPanel>
        <!-- ROW 2 -->
        <Button Content="{Binding Source={StaticResource Localizer},Path=Localize.TagBlock_GetValue}"
                Command="{Binding CommandGetBlock}"
                Grid.Column="0"
                Grid.Row="2"
                Margin="{DynamicResource BasicMargin}"
                Width="{DynamicResource MediumControlWidth}"
                Height="{DynamicResource MediumControlHeight}" />
        <Button Content="{Binding Source={StaticResource Localizer},Path=Localize.TagBlock_SetValue}"
                Command="{Binding CommandSetBlock}"
                Grid.Column="1"
                Grid.Row="2"
                Margin="{DynamicResource BasicMargin}"
                Width="{DynamicResource MediumControlWidth}"
                Height="{DynamicResource MediumControlHeight}" />
    </Grid>
</UserControl>
